<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="multiplex.facade.Facade"%>
<%@page import="multiplex.model.Usuario"%>
<%!Facade fachada = new Facade();%>
<%

//if(session.getAttribute("sessao")==null) pageContext.forward("index.jsp");
//Sessao sessao = (Sessao) session.getAttribute("sessao");
Usuario user = fachada.autenticaUsuario(request.getParameter("login"),request.getParameter("senha"));
if(user!=null){
	session.setAttribute("usuario",user);
	pageContext.forward("Impressao.jsp");
	System.out.println("Compra executada");
	}
else{
	pageContext.forward("Impressao.jsp");
	System.out.println("Usuario/senha invalidos");
}
 %>